/*
 * @Author: LiMG
 * @Date: 2024-01-18 14:13:02
 * @Description: 路由主入口
 */
import { createRouter, createWebHistory } from "vue-router";
import MainLayout from "@/views/Layout.vue";
import UserIndex from "@/views/userManage/Index.vue";

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: "/",
            name: "主页",
            component: MainLayout,
            children: [
                {
                    path: "/home",
                    name: "首页",
                    component: () => import("@/views/Home.vue"),
                },
                {
                    path: "/login",
                    name: "登录",
                    component: () => import("@/views/Login.vue"),
                },
                {
                    path: "/upload",
                    name: "上传文件",
                    component: () => import("@/views/fileUpload/FileUploadChunk.vue"),
                },
                {
                    path: "/systemManage",
                    name: "系统管理",
                    children: [
                        {
                            path: "/user",
                            name: "用户管理",
                            component: UserIndex,
                        },
                    ],
                },
            ],
        },
        // {
        //     path: "/login",
        //     name: "登录",
        //     component: () => import("@/views/Login.vue"),
        // },
        // {
        //     path: "/upload",
        //     name: "文件上传",
        //     component: MainLayout,
        //     children: [
        //         {
        //             path: "/upload",
        //             name: "文件上传",
        //             component: () => import("@/components/fileUpload/FileUploadChunk.vue"),
        //         },
        //     ],
        // },
        // {
        //     path: "/home",
        //     name: "首页",
        //     component: MainLayout,
        //     children: [
        //         {
        //             path: "/home",
        //             name: "首页",
        //             component: () => import("@/views/Home.vue"),
        //         },
        //     ],
        // },
        // {
        //     path: "/systemManage",
        //     name: "系统管理",
        //     component: MainLayout,
        //     children: [
        //         {
        //             path: "/user",
        //             name: "用户管理",
        //             component: UserIndex,
        //         },
        //     ],
        // },
    ],
});

export default router;
